<template src="./template.html">

</template>

<script>
    import imgInput from "../img_input.vue";
    export default {

        data() {
            var serverUrl = 'http://skyforest.static.elab-plus.com/temp/template26/';
            return {
                serverUrl:serverUrl,
                uploading:false,
                disabled:false,
                placeholder:'壮年岁月，不可挽回的进入人生的分水岭',
                isshow:true,
                obj:{
                    text1:'',
                    text2:'',
                    text3:'',
                    text4:'',
                    text5:'',
                    text6:'',
                    text7:'',
                    text8:'',
                    text9:'',
                    text10:'',
                    text11:'',
                    text12:'',
                    text13:'',
                    text14:'',
                    logoUrl:`http://skyforest.static.elab-plus.com/temp/template26/LOGO.png`,
                    picUrl1:`${serverUrl}pic1.png`,
                    picUrl2:`${serverUrl}pic2.png`,
                    picUrl3:`${serverUrl}pic3.png`,
                    picUrl4:`${serverUrl}pic4.png`,
                    picUrl5:`${serverUrl}pic5.png`,
                    picUrl6:`${serverUrl}pic6.png`,
                    picUrl7:`${serverUrl}pic7.png`,
                    picUrl8:`${serverUrl}pic8.png`,
                    picUrl9:`${serverUrl}pic9.png`,
                    picUrl10:`${serverUrl}pic10.png`,
                    picUrl11:`${serverUrl}pic11.png`,
                    picUrl12:`${serverUrl}pic12.png`,
                }
            }
        },
        props:{
            switchOn:Boolean,
            perviewOn:Boolean,
            updateData:String,
        },
        mounted() {
            if(this.updateData){
                this.obj=JSON.parse(this.updateData);
            }
        },
        watch:{
            switchOn(val){
                if(val){
                    this.$emit('com',this.obj)
                }
            },
            perviewOn(val){
                this.disabled=val;
                this.isshow=!val;
            },
            updateData(val){
                if(val){
                    val=JSON.parse(val);
                    this.obj = val;
                }
            }
        },
        methods: {},
        components:{
            imgInput,
        }
    }
</script>

<style lang="scss" scoped>
  @import "./style.scss"
</style>
